package com.as.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.IOException;
import java.util.Properties;

/**
 * Created by 汪贵春 on 2017/3/5.
 */
@Controller
public class LoginController {

    @RequestMapping(value = "/{qid}")
    public String spring(@PathVariable("qid") String qid, Model model) throws IOException {
        model.addAttribute("qid", qid);

        Properties pps = new Properties();
        pps.load(this.getClass().getClassLoader().getResourceAsStream("server.properties"));
        model.addAttribute("server_ip", pps.getProperty("server_ip"));

        return "ClientCheck";
    }

}
